<?php
/**
 *
 * PHP versions 4 and 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       cake
 * @subpackage    cake.cake.libs.view.templates.layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<?php echo $this->Html->charset(); ?>
	<title>
		<?php __('Instituto Nacional de Prevención, Salud y Seguridad Laborales - INPSASEL - '); ?>
		<?php echo $title_for_layout; ?>
	</title>
	<?php
		echo $this->Html->meta('icon');

		echo $this->Html->css(array('inpsasel.style', 'jquery-ui-1.8.2.custom', 'OpenLayers/style', 'fancybox/jquery.fancybox-1.3.1', 'menu'));
		
		echo $javascript->link(array('jquery', 'jquery-ui-1.8.2.custom.min', 'fancybox/jquery.mousewheel-3.0.2.pack', 'fancybox/jquery.fancybox-1.3.1', 'jquery.ui.datepicker-es', 'menu', 'validacion', 'jquery.form', 'jquery.validate'));
		
		echo $scripts_for_layout;
		
	?>
	
	
		<!--blueprint files being -->
<link rel="stylesheet" href="<?= $html->url('/') ?>css/blueprint/screen.css" media="screen, projection" />
<link rel="stylesheet" href="<?= $html->url('/') ?>css/blueprint/print.css" media="print" />
<!--[if IE]>
<link rel="stylesheet" href="<?= $html->url('/') ?>css/blueprint/ie.css" media="screen,projection" />
<![endif]-->
<!-- blueprint files end-->

<!--[if lt IE 7]>
<style type="text/css">
   .dock img { behavior: url(iepngfix.htc) }
   </style>
<![endif]-->

</head>
<body>
	<div>
		<?php
			
			//if($logueo) echo "";
			//else{
		?>

		<?
			//} 
		?>
		<?php
			//pr($_SESSION);
			//echo "esto devuelve read: ".$session->read('Message.auth.message');
			$isauth = $session->check('Message.auth.message');
			$mensaje = $session->flash();
			if(!empty($mensaje) || $isauth){
				if(!empty($mensaje)){
					echo $mensaje;
				}else{
					show_mensaje($session->read('Message.auth.message'));
					$this->Session->delete('Message');
				}
				//echo "holaa";
				
		?>
			
		<script type="text/javascript">
			$(document).ready(function() {
				$(".message").addClass("visible");
				$("message").click(function(){
						$(".message").slideUp(1500);
						return;
				});
				$(".message").slideDown(1500, function(){
					setTimeout("$('.message').slideUp(1500);", 7000);
				});
				
			});
		</script>
		<?
			}
		?>
	</div>
	<div id="sobreHeader">
		<div id="header">
				<center>
				<? echo $html->image('cintillo.jpg', array('style'=>'margin:0 auto')); ?>
				</center>
				<h1><?php echo __('Instituto Nacional de Prevención, Salud y Seguridad Laborales', true); ?></h1>
		</div>
	</div>
	<div id="menu">
		<ul class="menu">
			<li id="menu" onclick="$('this').addClass('current');">
				<a href="<?= $html->url(array('controller'=>'/')); ?>" class="parent"><span>Inicio</span></a>
			</li>
			<li id="ovallera"><a href="#" class="parent"><span>Hospital La Ovallera</span></a>
				<div>
					<ul>
						<li id="mcr"><a href="#" class="parent"><span>Casos Retrospectivos</span></a>
							<div>
								<ul>
									<li><a href="<?= $html->url(array('controller'=>'Casos', 'action'=>'index')); ?>"><span>Listado</span></a></li>
									<li><a href="<?= $html->url(array('controller'=>'Casos', 'action'=>'add')); ?>"><span>Registro</span></a></li>
								</ul>
							</div>
						</li>
						<li id="mco"><a href="#" class="parent"><span>Evaluación Psicológica</span></a>
							<div>
								<ul>
									<li><a href="<?= $html->url(array('controller'=>'Datos', 'action'=>'paso1')); ?>"><span>Registro</span></a></li>
								</ul>
							</div>
						</li>
					</ul>
				</div>
			</li>
			
			<li id="control"><a href="#"><span>Control de Transcripción</span></a>
				<div>
				<ul>
					<li id="mcm"><a href="#" class="parent"><span>Metro de Caracas</span></a>
						<div>
							<ul>
								<li><a href="<?= $html->url(array('controller'=>'Datos', 'action'=>'listado_metro')); ?>"><span>Listado</span></a></li>
								<li><a href="<?= $html->url(array('controller'=>'Datos', 'action'=>'metro')); ?>"><span>Registro</span></a></li>
							</ul>
						</div>
					</li>
					<li id="mcmi"><a href="#" class="parent"><span>MINERVEN</span></a>
						<div>
							<ul>
								<li><a href="<?= $html->url(array('controller'=>'Datos', 'action'=>'listado_minerven')); ?>"><span>Listado</span></a></li>
								<li><a href="<?= $html->url(array('controller'=>'Datos', 'action'=>'minerven')); ?>"><span>Registro</span></a></li>
							</ul>
						</div>
					</li>
					<li id="mcmi"><a href="#" class="parent"><span>La Ovallera</span></a>
						<div>
							<ul>
								<li><a href="<?= $html->url(array('controller'=>'Datos', 'action'=>'listado_ovallera')); ?>"><span>Listado</span></a></li>
								<li><a href="<?= $html->url(array('controller'=>'Datos', 'action'=>'paso1')); ?>"><span>Registro</span></a></li>
							</ul>
						</div>
					</li>
					<li id="mcmi"><a href="#" class="parent"><span>Exportar</span></a>
						<div>
							<ul>
								<li><a href="<?= $html->url(array('controller'=>'Datos', 'action'=>'exportar_ovallera')); ?>"><span>Datos La Ovallera</span></a></li>
								<li><a href="<?= $html->url(array('controller'=>'Datos', 'action'=>'exportar_minerven')); ?>"><span>Datos Minerven</span></a></li>
							</ul>
						</div>
					</li>
				</ul>
				</div>
			</li>
			<li ><a href="<?= $html->url(array('controller'=>'Panel')); ?>"><span>Panel Administrativo</span></a></li>
			<? 
				//pr($_SESSION);
				if ($session->check("Auth.Usuario")){
					
			?>
				<li class="last"><a href="<?= $html->url(array('controller'=>'Usuarios', 'action'=>'logout')); ?>"><span>Cerrar Sesión</span></a></li>
			<?
				}
			?>
			
			
		</ul>
	</div>
	<div id="container" class="container">
		<div id="main">
			<div id="content" class="span-24 sombra">
				
				<?php echo $content_for_layout; ?>
				
			</div>
			<div id="spinner" style="display: none; position: fixed; bottom: 50px; right: 50px;">
                <?php echo $html->image('world.gif', array('width'=>'75%')); ?>
			</div>
		</div>
		<div id="footer">
			<? 
				$inicio = 2010;
				$actual = date('Y');
			?>
			&copy; <?= $inicio ?> <? if($actual > $inicio) echo " - ".$actual ?> Instituto Nacional de Prevención, Salud y Seguridad Laborales (INPSASEL)<br/>
			<?php echo $this->Html->link(
					$this->Html->image('cake.power.gif', array('alt'=> __('CakePHP: the rapid development php framework', true), 'border' => '0')),
					'http://www.cakephp.org/',
					array('target' => '_blank', 'escape' => false)
				);
				echo "&nbsp;";
				echo $this->Html->link(
					$this->Html->image('postgresql_powered.png', array('alt'=> __('PostgreSQL: the rapid development php framework', true), 'border' => '0', 'height'=>15)),
					'http://www.postgresql.org/',
					array('target' => '_blank', 'escape' => false)
				);
				//echo $html->image('blueprintcss.jpg', array('height'=>25));
			?>
			
		</div>
	</div>
	<?php echo $this->element('sql_dump'); ?>
<div style="display:none;">
<a href="http://apycom.com/">Apycom jQuery Menus</a>
</div>
</body>
</html>